package survivalcraft.common;

import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;

import java.util.ArrayList;
import java.util.List;
import java.util.Random;

import net.minecraft.src.Block;
import net.minecraft.src.BlockLeaves;
import net.minecraft.src.BlockLeavesBase;
import net.minecraft.src.ColorizerFoliage;
import net.minecraft.src.CreativeTabs;
import net.minecraft.src.EntityPlayer;
import net.minecraft.src.IBlockAccess;
import net.minecraft.src.Item;
import net.minecraft.src.ItemStack;
import net.minecraft.src.Material;
import net.minecraft.src.World;
import net.minecraftforge.common.IShearable;

public class BlockStickLeaves extends BlockLeaves
{
   
    protected BlockStickLeaves(int blockID, int baseIndexInPNG) {
		super(blockID, baseIndexInPNG);
	}

	/**
     * Drops the block items with a specified chance of dropping the specified items
     */
    public void dropBlockAsItemWithChance(World par1World, int x, int y, int z, int par5, float par6, int par7)
    {
        if (!par1World.isRemote)
        {
            byte var8 = 20;

            if ((par5 & 3) == 3)
            {
                var8 = 40;
            }

            if (par1World.rand.nextInt(var8) == 0)
            {
                int var9 = this.idDropped(par5, par1World.rand, par7);
                this.dropBlockAsItem_do(par1World, x, y, z, new ItemStack(var9, 1, this.damageDropped(par5)));
            }

            if ((par5 & 3) == 0 && par1World.rand.nextInt(200) == 0)
            {
                this.dropBlockAsItem_do(par1World, x, y, z, new ItemStack(Item.appleRed, 1, 0));
            }

            this.dropBlockAsItem_do(par1World, x, y, z, new ItemStack(Item.stick, 1, 0));

        }
    }

}
